Archive-name: eiffel-faq Last-modified: 27 Apr 1995 EIFFEL: FREQUENTLY ASKED QUESTIONS ---------------------------------- This question-and-answer list is posted monthly to the Usenet newsgroups comp.lang.eiffel, comp.answers and news.answers. Please send corrections, additions and comments to Roger Browne (rogerb@eiffel.demon.co.uk). This information is abstracted and condensed from the posts of many contributors to comp.lang.eiffel, supplemented by information from vendors. No guarantees are made regarding its accuracy. This compilation is by Roger Browne. Distribution over the Internet or by electronic mail is unrestricted. Other use requires my permission. You can receive the latest copy by anonymous file transfer from: ftp://ftp.cm.cf.ac.uk/pub/eiffel/eiffel-faq ftp://rtfm.mit.edu/pub/usenet/news.answers/eiffel.faq or by sending an email message to archive-server@cm.cf.ac.uk with the following message body: send Eiffel eiffel-faq ---------- CONTENTS Changes since the last posting: Q07: Added details of new book "OOP in Eiffel" (Rist/Terwilliger) L13: Are there any destructors in Eiffel? What about object finalization? (new question) Thanks for help with this month's updates to: Bertrand Meyer, Rock Howard As the previous posting of this FAQ apparently did not propagate to many parts of the world, here is a list of the changes in that posting: Q04: More details of discounted Eiffel products Q07: Added details of new book "OOP in Eiffel" (Thomas/Weedon) Q08: Added details of the Eiffel patterns mailing list Q16: New contact details for Feinarbeit Q17: Eiffel activities at OOPSLA and Object Expo conferences Also, Tower's product details were updated in many places Frequently Asked Questions: Q01) What is Eiffel? Q02) Where did Eiffel come from? Q03) What Eiffel products are available? Q04) Are there any school or student discounts? Q05) Is Eiffel available in the public domain or as shareware? Q06) What is Sather? How does it compare to Eiffel? Q07) What books are available for learning about Eiffel? Q08) Are any magazines or newsletters available concerning Eiffel? Q09) Is Eiffel available on PC, Mac, NeXT, Amiga, Atari, ...? Q10) Is there an archive of the comp.lang.eiffel newsgroup? Q11) How much memory and disk space does Eiffel development require? Q12) How large are typical Eiffel executables? Q13) Are there standards for the Eiffel language? Q14) How fast do Eiffel applications run? Q15) Are there any Eiffel user groups? Q16) Where can I get Eiffel products and services? Q17) Are there any conferences for Eiffel users? Q18) Why do Eiffel implementations compile to C? Q19) What is BON? Q20) Where can I get an Eiffel editor or emacs-mode? Q21) Where can I find Eiffel on the World-Wide-Web? Language Issues: L01) What features does Eiffel have? L02) What changes have been made to the Eiffel language definition? L03) What libraries come with Eiffel? L04) What's the big deal about preconditions and postconditions? L05) Please explain and discuss covariance vs. contravariance. L06) Is it true that there are "holes" in the Eiffel type system? L07) Is there support for concurrency in Eiffel? L08) Why doesn't Eiffel allow function overloading? L09) Why are there no procedural types in Eiffel? L10) Why are there no class attributes in Eiffel? L11) How can I call the parent-class version of a redefined routine? L12) Where can I find a comparison between Eiffel and C++? ---------- Q01) What is Eiffel? Eiffel is an advanced object-oriented programming language that emphasizes the design and construction of high-quality and reusable software. Eiffel is not a superset or extension of any other language. Eiffel strongly encourages object-oriented programming and does not allow dangerous practices from previous generation languages although it does interface to other languages such as C and C++. Eiffel supports the concept of "Design by Contract" to improve software correctness. Beyond the language aspect Eiffel may be viewed as a method of software construction. Eiffel is an excellent vehicle for software education, including for a first programming course. ---------- Q02) Where did Eiffel come from? Eiffel was created by Bertrand Meyer and developed by his company, Interactive Software Engineering (ISE) of Goleta, CA. Dr. Meyer borrowed on his extensive experience with OOP, particularly with Simula. He also added in important concepts from his academic work on software verification and computer language definition. Eiffel's design addresses many practical concerns that software engineers face when creating complex software. Eiffel has evolved continually since its conception on September 14, 1985 and its first introduction in 1986. Eiffel is named after Gustave Eiffel, the engineer who designed the Eiffel Tower. ---------- Q03) What Eiffel products are available? ISE Eiffel 3 is a commercially supported product from Interactive Software Engineering. ISE Eiffel 3 is a complete graphical development environment meant for the production of quality software, with particular attention being given to the development of large systems. The environment itself is written in Eiffel, and is an example of non-trivial system - about 3000 classes. Eiffel/S is produced by SIG Computer GmbH of Germany, based on the Eiffel 3 language definition. Eiffel/S release 1.3 includes a command-line compiler with automatic configuration management, libraries and manual. TowerEiffel is an open high-performance Eiffel development system from Tower Technology Corporation of Austin, Texas. TowerEiffel includes: - a fast Eiffel 3 compiler that generates executables that can rival applications built with C and C++ in terms of performance; - both graphical and emacs-based multi-language source level debuggers; - support for C, C++ and Objective C as external languages. Also can generate code for each of these languages. - an emacs-based development environment including syntax-directed color highlighting, browsing, and automatic documentation generation in ASCII, LaTex, RTF, HTML or FrameMaker mif format; - kernel and support libraries including simple persistence and heterogenous object distribution. ---------- Q04) Are there any school or student discounts? Both ISE Eiffel and SIG Eiffel/S include aggressive site-licensing and discount licenses for schools and universities. Eiffel/S offers an inexpensive student or trial license. This license is limited to building systems with up to 75 classes. You do not have to be a student to buy it, and you get a discount if you subsequently upgrade to the full version. Eiffel/S offers very cheap high school site licences, and there is also a heavily-discounted version available by means of the coupon in the book "OO Programming in Eiffel". Tower offers TowerEiffel and other add-on libraries and tools to Universities and Colleges in the form of custom licenses that are specially arranged to fit the requirements and budgets of those choosing to use Eiffel for educational purposes. Free evaluation licenses are available for professors or departments who are seriously considering TowerEiffel for classroom or other educational use. ISE offers a much-reduced price on its Linux product for individuals. ---------- Q05) Is Eiffel available in the public domain or as shareware? There is not currently a public domain Eiffel compiler. ISE has expressed willingness to support the serious efforts of those who wish to create a PD Eiffel, but so far no such effort has succeeded. There is, however, a somewhat limited Eiffel 2.3 interpreter for the Atari ST which is shareware (DM50). The documentation is in German, and the example files seem quite interesting. Inheritance does not seem to be supported (!), but there is an interesting extension to allow "for all" and "for some" in assertions. The EON Eiffel compiler is shareware under MS-DOS and Linux, and a beta- test version is available from ftp://ftp.demon.co.uk/pub/eiffel/eon-eiffel/ The following Eiffel archive sites allow anonymous file transfer: ftp://ftp.tu-clausthal.de/pub/atari/languages/eiffel/vici_102.lzh The Atari ST interpreter referred to above. ftp://ftp.cm.cf.ac.uk/pub/eiffel University of Wales. Contains the latest version of this FAQ, plus the front-end parser (ep) and various public domain classes. To contribute, contact Ted Lawson (ted@cm.cf.ac.uk). ftp://ftp.fu-berlin.de/pub/unix/languages/heron This is an Eiffel front-end parser (HERON) in the public domain, created by Burghardt Groeber and Olaf Langmack of the Freie Universitat in Berlin. ftp://ftp.informatik.uni-stuttgart.de/pub/eiffel Falkultaet Informatik der Universitaet Stuttgart, Germany. Contains a compiler generator, several encapsulations, a pretty-printer for Eiffel/S, and some utility classes. To contribute, contact Joerg Schulz (schulz@adam.informatik.uni-stuttgart.de). ftp://utarlg.uta.edu/CSE/EIFFEL UT-Arlington, USA. Contains some code from Eiffel Outlook back issues. ftp://wuarchive.wustl.edu/graphics/gif/e/eiffel_tower Contains a GIF graphic of the eiffel tower (also on plaza.aarnet.edu.au from Australia only). ---------- Q06) What is Sather? How does it compare to Eiffel? Sather is an object-oriented language, originally patterned after Eiffel, created by Stephen Omohundro and others at ICSI of Berkeley, CA. Sather simplifies some Eiffel constructs, eliminates others, and adds some constructs of its own such as iteration abstraction, built-in arrays, overloading and object constants. Sather does not support Design by Contract. See the usenet newsgroup comp.lang.sather for more details. ---------- Q07) What books are available for learning about Eiffel? The classic text for learning about Eiffel (and OO programming in general) is Dr. Meyer's "Object Oriented Software Construction". Although the language has evolved significantly since the book was published, the presentation of the basic problems and solutions which motivate the object- oriented mind set are still quite compelling. This is the book to get if you are new to the object-oriented world (Prentice Hall, ISBN 13-629031-0). A new edition is expected during 1995. Available in French as "Conception et Programmation par Objets" (90/10 InterEditions, ISBN 2-7296-0272-0) and in German as "Objektorientiert Softwareentwicklung (Hanser, ISBN 3-446- 15773-5). Also by Dr. Meyer, "Eiffel: The Language", combines an introduction to Eiffel, the language reference, and a good deal of philosophy into its 600 pages. This is a rigorous and comprehensive book which some readers may find heavy going despite Dr. Meyer's clarity of expression. It is the definitive language reference, and essential reading for all serious Eiffel users. Get the second or later printing (same ISBN), which includes many corrections and changes (there is not a second edition, and none is currently underway) (Prentice Hall, ISBN 13-247925-7). Available in French as "Eiffel, le langage" (94/10 InterEditions, ISBN 2-7296-0525-8). Dr. Meyer and Jean-Marc Nerson have edited "Object-Oriented Applications". It includes an introduction to Eiffel technology followed by seven in-depth descriptions of large applications written in Eiffel. (Prentice Hall, ISBN 13-013798-7) Robert Switzer has written "Eiffel: An Introduction". This is a very clear and concise Eiffel primer, with many code fragments and two substantial Eiffel applications. (Prentice Hall, ISBN 13-105909-2). Available in French as "Introduction a Eiffel" (Masson, ISBN 2-225-84-656-1) ISE distributes a set of 6 video lectures entitled "Object-Oriented Software Construction", taught by Bertrand Meyer. These provide an overall introduction to the method and use ISE Eiffel 3 to illustrate the concepts. Frieder Monninger's book "Eiffel: Objektorientiertes Programmieren in der Praxis" is a very down-to-earth Eiffel handbook in German. (Heise, ISBN 3- 88229-028-5). Bertrand Meyer's "Reusable Software: The Base Object-Oriented Component Libraries" (Prentice Hall, ISBN 0-13-245499-8, about 530 pages) describes principles of library design and the taxonomy of fundamental computing structures. Serves as a manual for the EiffelBase libraries. Bertrand Meyer's "An Object-Oriented Environment: Principles and Application" (Prentice Hall, ISBN 0-13-245507-2, 240 pages) describes the principles that led to the ISE EiffelBench environment as well as the "Melting Ice" compilation technology. Also describes the EiffelBuild GUI application builder. Richard Wiener's "Software Development Using Eiffel: There can be life other than C++" (Prentice-Hall, ISBN 0-13-100686-X) is a useful book (full of serious code samples) for those with a grounding in another OO language. A book by Kim Walden and Jean-Marc Nerson, "Seamless Object-Oriented Software Architecture: Analysis and Design of Reliable Systems", describes the BON method in detail (Prentice Hall, ISBN 0-13-031303-3). Pete Thomas and Ray Weedon's "OO Programming in Eiffel" is a very comprehensive Eiffel tutorial and textbook, with a solid "Abstract Data Type" approach. Includes a coupon for a discounted compiler (Addison- Wesley, ISBN 0-201-59387-4). Another book called "OO Programming in Eiffel" is by Robert Rist and Robert Terwilliger, and is a textbook with an emphasis on design. (Prentice-Hall, ISBN 0-13-205931-2). ---------- Q08) Are any magazines or newsletters available concerning Eiffel? Eiffel Outlook is a bi-monthly journal devoted to Eiffel. Now in its fourth year of publication, Eiffel Outlook is 24 to 28 pages long. Topics cover all areas of interest to the Eiffel community. Subscriptions, trial subscriptions and back issues are available. Eiffel Outlook is distributed by: SIG Computer in Germany Everything Eiffel in the UK and France Simon Parker in Ireland IMSL in Japan Enea Data in Sweden Tower Technology in the USA and for all other countries Details are available on the Web at or by sending email to . ISE produces a newsletter "Eiffel World". Subscriptions are free (email your request to info@eiffel.com). Individual copies are available from: Cybertech in Argentina Class Technology in Australia Jay-Kell Technologies in Canada SOL in France SIG Computer in Germany Eiffel Ireland in Ireland Etnoteam in Italy Information & Math Science Lab or Software Research Associates in Japan Chromasoft in Mexico Science O-O Products & Systems in the Netherlands Objective Methods in New Zealand Ruperez & Associates in Spain Enea Data in Sweden Abstraction in Switzerland Everything Eiffel in the UK If you're interested in Software Design Patterns you may like to subscribe to the Eiffel Patterns mailing list. Send email to: e-patterns-request@cbr.dit.csiro.au ---------- Q09) Is Eiffel available on PC, Mac, NeXT, Amiga, Atari, ...? This is the latest information that I have, but it does change rapidly. SIG Eiffel/S 1.3 is available for DOS on the PC. As at January 1994, the following C compilers are supported: Microsoft C 7.0, Borland C++ 3.x, Gnu 2.2.2 (with DJ Expander), Gnu 2.4.5 (with emx-g expander), Symantec C++ 6.0, Watcom 9.5. SIG uses Symantec in-house. It works best with a 32-bit compiler, e.g. Gnu, Symantec, Watcom. Eiffel/S 1.3 is also available for OS/2 (using GCC 2.4.5 emx-g, Watcom C 9.5 or IBM C/Set) and Windows/NT (Microsoft 32-bit C, Watcom C 9.5 or Symantec C++ 6.0), and for the following Unix systems: Linux, PC Unix (Interactive, SCO, and ESIX), SPARC, NeXT, NeXTstep-Intel, HP/9000, DEC 5xxx, Sony News, DG Aviion, DEC Alpha (OSF-1), and RS/6000. Eiffel/S can be used to produce MS-Windows programs when used with the EPWL library (and Watcom C++ 10 or Microsoft Visual C++ 32-bit edition as the back-end). Eiffel/S will also support the ICE library for graphics applications under MS-Windows or Unix. ISE's Eiffel 3 (Release 3.2) is available for DEC Alpha (OSF-1), DEC MIPS (Ultrix), DG Aviion (and hence other 88Open platforms), Fujitsu, HP UX, IBM RS/6000, Linux (with Motif only), NeXTSTEP (Intel and Motorola), Pyramid, SCO (Open Desktop), Silicon Graphics, AIX/PS2 and Sparc (Solaris 2.3 or SunOS). The VMS and version is nearing completion. Development is underway for other platforms. ISE Personal Eiffel is a low-cost menu/keyboard-driven implementation of Eiffel 3 which runs under Microsoft Windows 3.1. It does not require a C- compiler back-end, and combines interpreted user code with precompiled libraries. It includes the EiffelBase, EiffelLex and EiffelParse libraries in source code form. You cannot use it to develop GUI software or call external C routines. ISE is developing further Windows products. Tower Technology Corporation's TowerEiffel 1.4 is available for: - SUN Sparc or compatible running SunOS 4.1.x, - SUN Sparc or compatible running Solaris 2.x, - HP 9000/700 running HPUX 9.05, - NeXTStep x86, - NeXTStep m68k, - Linux x86 (kernel 0.9 and 1.1), and - OS/2 x86 2.1 or Warp. A beta release of TowerEiffel is also immenient for Win/NT. ---------- Q10) Is there an archive of the comp.lang.eiffel newsgroup? Yes, at the following FTP sites: ftp://wuarchive.wustl.edu/usenet/comp.lang.eiffel/ ftp://gatekeeper.dec.com/pub/plan/eiffel/usenet/ (to September 1992 only) and on the WWW at http://www.cm.cf.ac.uk/CLE/ ---------- Q11) How much memory and disk space does Eiffel development require? To install and run Eiffel/S 1.3 or Eon Eiffel under DOS, you need about 10MB of disk space and at least 4MB RAM (8MB recommended). Other products and platforms require more. However, for serious Eiffel work you could easily use 100MB or more disk space and 32MB RAM. ---------- Q12) How large are typical Eiffel executables? (How large are typical C executables?) Seriously, Eiffel does impose a minimum size which is large since even trivial Eiffel applications bring in a lot of classes. So, a simple program like "Hello World" will create a relatively large executable. Interestingly, Eiffel applications seem to grow less rapidly as new capabilities are added. Reuse does help out tremendously in this regard. A good Eiffel compiler allows large applications to be smaller than equally functional applications written in C. Note that leaving assertion checking in the code increases the size of applications a lot. Despite this, many of us prefer that they remain throughout development. Some even deliver a PRECONDITIONS-only version of their applications to their early customers. ---------- Q13) Are there standards for the Eiffel language? The definition of the Eiffel language is in the public domain. This definition is controlled by NICE, the Non-profit International Consortium for Eiffel. This means that anyone or any company may create a compiler, interpreter, or whatever having to do with Eiffel. NICE reserves the right to validate that any such tool conforms to the current definition of the Eiffel language before it can be distributed with the Eiffel trademark. (i.e. advertised as an "Eiffel" compiler.) The Eiffel trademark is owned and controlled by NICE. NICE is using Bertrand Meyer's book, "Eiffel: The Language" (2nd Printing), as the initial definition of the language. The NICE board of directors for 1995 consists of Christine Mingins (chair), Bertrand Meyer (treasurer), Simon Parker (secretary) and Paul Johnson. NICE has formed the Eiffel Standards Group (ESG) to resolve standards questions and control the evolution of the language. The three current Eiffel Compiler Vendors (ISE, SIG and Tower) are represented in the ESG as well as many important and influential users of Eiffel. There are three committees -- Language, Library, and Future Directions. The Language Committee will address the ambiguities in the Eiffel Version 3 language specification as well as the differences that appear between the current Eiffel 3 implementations. The Library Committee will standardize the Kernel library. The Future Requirements Committee will prioritize the long range direction of the standards work performed by the other two committees. NICE (Nonprofit International Consortium for Eiffel) 45 Hazelwood Shankill Co Dublin Republic of Ireland TEL: +353 1 282 3487 email: nice@atlanta.twr.com ---------- Q14) How fast do Eiffel applications run? Early versions of Eiffel were slow. Recent implementations have improved dramatically. However, to achieve maximum performance under any Eiffel implementation, run-time assertion monitoring must be switched off. It's hard to generalise, but compared to C++, simple computation-intensive applications will run perhaps 15% slower. Large applications are often dominated by memory management rather than computation. ISE recently demonstrated that by simply adding a call to the garbage collector's "full- collect" routine at a time when there were known to be few live objects, performance became dramatically faster than a corresponding C++ version. ---------- Q15) Are there any Eiffel user groups? International Eiffel User Group UK & Ireland Eiffel Interest Group Darcy Harrison - Attention: IEUG (new address to be notified) ISE Inc. (Holds meetings and seminars) 270 Storke Road, Suite 7 Goleta, CA 93117, USA TEL (805) 685-1006 FAX (805) 685-6869 darcyh@eiffel.com GUE, Groupe des Utilisateurs Eiffel (France) Jean-Marc Nerson 104 rue Castagnary, 75015 Paris TEL +33 1 45 32 58 80 FAX +33 1 44 32 58 81 marc@eiffel.fr (meets every two months or so) TowerEiffel User's Group Private cyberspace mailing list for supported Tower customers with meetings coinciding with major OO Conferences and Events. ---------- Q16) Where can I get Eiffel products and services? Interactive Software Engineering, Inc. Jay-Kell Technologies, Inc. 270 Storke Road, Suite 7 48 Lakeshore Road, Suite #1 Goleta, CA 93117 Pointe Claire, Quebec TEL 805-685-1006 Canada H9S 4H4 FAX 805-685-6869 TEL +51 4 630 1005 email info@eiffel.com FAX +51 4 630 1456 SIG Computer GmbH Tower Technology Corporation zu den Bettern 4 1501 Koenig Lane D 35619 Braunfels, Germany Austin, TX 78756 USA TEL +49 6472 2096, FAX +49 6472 7213 TEL 512-452-9455 email eiffel@sigcomp.de FAX 512-452-1721 (cyrillic email eiffel@sigcomp.msk.su) email: tower@twr.com Class Technology Pty. Ltd. Cybertech 6 Pound Road Systens Integration for CIM Hornsby NSW 2077, Australia Suarez 1281, Third Floor,Apt.A TEL +61 2 477 6188 CP-1288 Buenos Aires, Argentina FAX +61 2 476 4378 TEL +54 1 28 1950 email class@peg.pegasus.oz.au FAX +54 1 322 1071 or 963 0070 Everything Eiffel Eiffel Ireland 6 Bambers Walk 45 Hazelwood Wesham PR4 3DG Shankill England Co Dublin, Ireland TEL & FAX +44 1772 687525 TEL +353 1 282 3487 email rogerb@eiffel.demon.co.uk email sparker@eiffel.ie EtnoTeam SOL Via Adelaide Bono Cairoli 34 104 rue Castagnary 20217 Milano , Italy 75015 Paris, France TEL +39 2 261621 TEL +33 1 45 32 58 80 FAX +39 2 26110755 FAX +33 1 45 32 58 81 email sales@etnomi.it email eiffel@eiffel.fr Enea Data Sritech Information Technology Box 232, Nytorpsvagen 5 744/51 2nd Floor S-183 23 Taby, Sweden 10 Mian Road, 4th Block TEL +46 8 792 25 00 Jayanagar, Bangalore, India 560011 FAX +46 8 768 43 88 TEL +91 812 640661 email eiffel@enea.se FAX +91 812 643608 Cromasoft SA de CV Objective Methods Ltd Mazatlan 161 PO Box 17356 (77 Chamberlain Rd) Col Condesa, 06140 Mexico Karori, Wellington, New Zealand TEL +52 5 286 82 13 TEL +64 4 476 9499 FAX +52 5 286 80 57 FAX +64 4 476 9237 or 8772 email claudio@croma.sunmexico.sun.com email dkenny@swell.actrix.gen.nz SOOPS Software Research Associates Sarphatistraat 133 1-1-1 Hirakawo-Cho NL-1018 GC Amsterdam, The Netherlands Chiyoda-ku Tokyo 102, Japan TEL +31 20 525 6644 TEL +81 3 3234 8789 FAX +31 20 624 6392 FAX +81 3 3262 9719 email A731CISK@HASARA11.BITNET email sugita@sra.co.jp Objectif Concept ZumaSoft Passage Cour-Robert 5 6235 Paseo Canyon Drive CH 1700 Fribourg, Switzerland Malibu, California 90265, USA TEL +41 37 232977 TEL & FAX +1 310 457-6263 FAX +41 37 464889 email tstevens@netcom.com Information and Math Science Lab Inc. Abstraction 2-43-1, Ikebukuro, Toshima-ku 18 Faubourg de l'Hopital Tokyo 171, Japan 2000 Neuchatel, Switzerland email fushimi@idas.imslab.co.jp phone +41.38.25.04.93 TEL +81 3 3590 5211 fax +41.38.259.857 FAX +81 3 3590 5353 email silberstein@clients.switch.ch Eon Software Feinarbeit 19 Stapleton Road Altenbraker Strasse 4 Heddington, Oxford OX3 7LX, UK D-12053 Berlin, Germany TEL +44 865 741452 tel +49 30 6215827 email ian@eonsw.demon.co.uk fax +49 30 6215863 email langmack@netmbx.netmbx.de Ruperez & Associates c/San Bartolome 21, 5F 20001 San Sebastian, Spain TEL +34 43 461801 email jipferur@si.ehu.es ---------- Q17) Are there any conferences for Eiffel users? The conferences listed here are not just for Eiffel. Eiffel shares the spotlight with other object-oriented languages including C++ and Smalltalk. Jun 5 - 8. 1995 Object Expo, New York, NY Bertrand Meyer is a scheduled keynote speaker; There will be a TowerEiffel User's Group meeting. Jul 31 - Aug 4, 1995 TOOLS USA, Santa Barbara, California Deadline for papers: 1 Feb Oct 16 - 20, 1995 OOPSLA, Austin TX An Eiffel BOF will be held -- contact Jim McKim . There will be a TowerEiffel User's Group meeting featuring a tour of Tower Technology's Corporate Headquarters. AFOOT (Austin Forum for OO Technology) co-founded by Rock Howard and administered by Tower, will host a special event featuring Grady Booch. TOOLS is the major international conference devoted to the applications of Object-Oriented technology. Other events, such as Eiffel User Group meetings or NICE meetings are often held in conjunction with TOOLS. TOOLS Conferences PO Box 6863, Santa Barbara, CA 93160, USA TEL (805) 685 1006, FAX (805) 685 6869 email tools@tools.com ---------- Q18) Why do Eiffel implementations compile to C? (Most, but not all, current Eiffel implementations compile to C or C++.) By using C as a target language, an Eiffel implementor can: - bring Eiffel to the marketplace faster and at lower cost - port their implementation more easily to other platforms - take advantage of optimisation provided by the C compiler Much of the technology that makes Eiffel relatively simple to use also makes it more difficult to implement (an Eiffel-to-C compiler is perhaps 4 to 5 times more difficult to create than a native Pascal compiler). Compiling Eiffel to C seems to work well under Unix. C is sometimes thought of as the native code of Unix. On the other hand, C is not universal on other platforms, and the Eiffel purchaser may need to buy a C compiler as well, and possibly replace it if the supported C compilers change with new versions of the Eiffel compiler. With a native-code compiler, you'd get somewhat better throughput and the potential for smaller executables and slightly better performance. You'd also get a higher price and an even longer wait for Eiffel to show up on other than the leading market share machines. ---------- Q19) What is BON? BON ("Business Object Notation") is a method for high-level analysis and design, offering a seamless reversible transition to an Eiffel implementation. The method emphasizes Design by Contract and systematic development. ---------- Q20) Where can I get an Eiffel editor or emacs-mode? Franck Arnaud's Eiffel extension to the Windows/WindowsNT programmers editor Codewright from Premia allows you to see Eiffel code in colour, has smart indenting and a few templates. Available by anonymous FTP from ftp://ftp.cm.cf.ac.uk/pub/eiffel/tools/cweiffel.zip The WINEDIT shareware programmer's editor offers colour syntax highlighting, works with Eiffel/S under MS-Windows, and is available from: ftp://src.doc.ic.ac.uk/computing/systems/ibmpc/windows3/programr/we-30d.zip and ftp://gatekeeper.dec.com/.f/micro/msdos/win3/programr/we-30d.zip Alan Philips' free Programmers File Editor also works with Eiffel/S under MS-Windows, has templates but not syntax highlighting, available from ftp://ftp.demon.co.uk/pub/ibmpc/windows/editors/pfe0507.zip Tower Technology Corporation supplies an Eiffel 3 emacs mode that supports syntax-directed highlighting, auto-indentation and is easily customized for font use, color and indentation amounts. It comes as part of the TowerEiffel system, but is also available free for anyone who requests it. Send email to elisp@atlanta.twr.com to get the latest version. ---------- Q21) Where can I find Eiffel on the World-Wide-Web? An Eiffel home page is held on the University of Wales College of Cardiff's server at http://www.cm.cf.ac.uk/CLE/. This server also hosts Tower's home page at http://www.cm.cf.ac.uk/Tower/. The ISE WWW server holds information about Eiffel and ISE's products, at http://www.eiffel.com/ or http://outback.eiffel.com/. ---------- L01) What features does Eiffel have? Eiffel is a pure object-oriented language. Its modularity is based on classes. It stresses reliability, and facilitates design by contract. It brings design and programming closer together. It encourages the re-use of software components. Eiffel offers classes, multiple inheritance, polymorphism, static typing and dynamic binding, genericity (constrained and unconstrained), a disciplined exception mechanism, systematic use of assertions to promote programming by contract, and deferred classes for high-level design and analysis. Eiffel has an elegant design and programming style, and is easy to learn. ---------- L02) What changes have been made to the Eiffel language definition? Eiffel is still a relatively new language, and there have been a number of changes to its definition. Here is a summary of the major changes: 1. Changes between the publication of "Object-Oriented Software Construction" in 1988, and the release of Eiffel 2.3: - Constrained genericity enables a generic class to restrict its generic parameters to the descendants of a given class - The indexing clause allows information about a class to be recorded for extraction by archival, browsing and query tools - The assignment attempt operator "?=" provides a way to make type-safe assignments going against the inheritance hierarchy - User-defined infix and prefix operator features - Expanded types support composite objects without dynamic allocation, and with value semantics - The obsolete clause for smooth library evolution - The unique keyword for implicitly-assigned integer codes - The multi-branch instruction (similar to a case statement) - The boolean operator for implication ("implies") 2. Changes with the introduction of Eiffel Version 3: - The feature adaptation subclause must now be terminated with "end" - Semicolons as instruction separators are optional - Groups of features are bracketed by a feature clause. All features are exported unless the feature clause specifies a restriction. The repeat subclause is no longer needed, because inherited features keep the original export status they had in the parent unless they are redefined, or are the subject of an export subclause in the feature adaptation clause. - Preconditions can only be replaced by weaker ones, postconditions can only be replaced by stronger ones. This is now enforced by the language through the use of "require else" in preconditions and "ensure then" in postconditions. - Ambiguities in repeated inheritance are resolved by a select clause. - A feature can no longer be replicated and redefined in the same feature adaptation clause, however the same effect can be achieved through repeated inheritance - Two or more features may be defined at the same time (e.g. "f1, f2 is..."). - The keyword "frozen" before a feature name prohibits redefinition of the feature in descendants - In an anchored declaration, the anchor may now also be a formal argument of the enclosing routine - A class may have zero, one or more creation procedures, designated with the "creation" keyword. A new creation syntax using the "!!" symbol allows the appropriate creation procedure to be specified. It is also possible to directly create an object of any type which conforms to the entity to which it is being attached. - The meaning of dot notation has been made more uniform, and alternative constructs have been provided for the special language-defined features that previously used dot notation: x.Create is now !! x y.Clone(x) is now y := clone(x) x.Forget is now x := Void x.Void is now x = Void x.Equal(y) is now equal(x, y) - Manifest arrays can be specified, for example <<"Jan", "Feb", "Mar">> which also provides a way to pass a variable number of arguments to a routine. - The command-line parameters are made available to the creation procedure of the root class as an array of strings. - A default rescue procedure called default_rescue may be defined and inherited. - A class may be declared to be an expanded class, in which case any type based on that class will be expanded. - An object may no longer contain a reference to an expanded object that is a sub-object of another object. Instead, upon assignment of an expanded object to a non-expanded object, the expanded object will be cloned, and a reference to the newly-cloned object will be stored in the non-expanded object. - The operator "div" has been replaced by "//", and the operator "mod" has been replaced by "\\". 3. Changes between first and second printings of "Eiffel: The Language" - New basic types INTEGER_REF, REAL_REF, CHARACTER_REF and BOOLEAN_REF etc have been introduced to provide non-expanded basic types. - Introduction of the POINTER type to enable external references to be passed around in Eiffel programs. - Calls from Eiffel to external routines no longer implicitly pass the current object as the first parameter. There are many other (more minor) changes, which Neil Wilson has summarized in ftp.cm.cf.ac.uk:/pub/eiffel/Docs in both Microsoft Rich Text Format and ASCII. ---------- L03) What libraries come with Eiffel? ISE Eiffel 3: EiffelBase (the basic library) is a library of reusable components covering data structures and algorithms. It is the result of long-going systematic effort at classifying the fundamental patterns and structures of computer science in a Linnaean manner. It relies heavily on the Eiffel method, in particular assertions (preconditions, postconditions, class invariants), Design by Contract, constrained genericity, and repeated inheritance. EiffelVision (the GUI library) is an encapsulation of essential graphical abstractions. It makes it possible to build graphical Eiffel applications without having to learn and use the internal details of X, Motif, OpenLook or other window systems, as they are all encapsulated in EiffelVision's classes in a form that is closer to application-related concepts. EiffelLex provides a set of lexical analysis facilities. EiffelParse (still in a somewhat provisional state) is an object-oriented approach to parsing. EiffelNet is a client-server application development communication system library for ISE Eiffel 3. Other libraries are under development; in particular, third-party products are being integrated into the EiffelShelf distribution. (If you are interested in submitting components to the EiffelShelf, for profit or just for fame, please contact shelf@eiffel.com). SIG Eiffel/S: The universal classes -- GENERAL, PLATFORM, ANY and NONE The special classes, some of which are treated specially by the compiler -- PART_COMPARABLE, COMPARABLE, NUMERIC, HASHABLE, BOOLEAN, CHARACTER, INTEGER, REAL, DOUBLE, ARRAY, BITS n, OBJECT_STRUCTURE and STRING ENVIRONMENT -- provides access to command line arguments and environment variables BASIC_IO -- access to standard input, standard output and error output serial I/O FORMAT -- conversion of other data types to and from strings EXCEPTION -- fine grained access to exception handling SYSTEM_TIME -- system time interface INTERNAL -- control of the garbage collector The FILES cluster: FILE, FILE_SYSTEM, FSYS_DAT -- files are modelled as persistent dynamic arrays TEXTFILE -- treats an ASCII text file as an array of strings The SORTER class -- a sorting 'expert' that knows how to sort arrays optimally The MATH class -- trig, log, truncation, and a few constants The basic container classes -- classified according to uniqueness (can the same object occur more than once in the container?), ordering (are objects in the container kept in sorted order?) and search access (does one search for a key, or for the object itself?), as well as by efficiency (is speed or size more important?): LIST, SORTED_LIST, SIMPLE_TABLE, HASH_TABLE, SORTED_TABLE, SHORT_LIST, SHORT_TABLE, SHORT_SORTED_LIST and SHORT_SORTED_TABLE Other container classes -- associative arrays accessed by a hashable key: DICTIONARY (with unique keys) and CATALOG (with multiple items per key) Specialised container classes -- STACK, QUEUE, PRIORITY_QUEUE and KEY_PRIORITY_QUEUE Abstract container classes -- define much of the interface of containers: COLLECTION, TABLE, SORTED_COLLECTION and SORT_TABLE. Iterator classes -- objects stored within containers can be visited sequentially with iterators. More than one iterator can be active on a container at one time: TRAVERSABLE, TWOWAY_TRAVERSABLE, ITERATOR and TWOWAY_ITER. The GRAPH Cluster -- a graph is defined by the classes VERTEX and EDGE. It may have weighted edges (WT_GRAPH) or unweighted edges (GRAPH). Iterators are provided to visit the edges emanating from a vertex (EDGE_ITER); or all the vertices of a graph in breadth-first order (BREADTH_ITER), depth-first order (DEPTH_ITER) or topological order (TOP_ITER). The MATCHER Cluster -- the MATCHER class is a pattern matcher that can build and activate an automaton to search for patterns in text. Effective descendants search for text using the Rabin-Karp algorithm (RK_MATCHER), the Knuth-Morris-Pratt algorithm (KMP_MATCHER) and the Boyer-Moore algorithm (BM_MATCHER). Others search for Regular Expressions (RE_MATCHER) and lists of keywords (KEYWORD_MATCHER). TXT_MATCHER is an iterator that searches for multiple occurrences of a pattern in an array of strings, using any of the matcher classes. The documentation is brief but readable, including examples and hints for adding new containers or matchers. All in all, a smaller but possibly tighter set of libraries. (This response may give the appearance that Eiffel/S libraries are much more extensive than ISE's, but the converse is true.) TowerEiffel comes with a complete set of kernel and support libraries. A subset of the Eiffel Booch Components (described below) are also included. A Serialization library that supports simple persistence and/or heterogenous distribution of any Eiffel instance -- no matter how deeply nested or self-referential -- is included. TowerEiffel for NEXTSTEP includes a free set of components and examples for interfacing TowerEiffel directly with Appkit and the Interface Builder using Tower's unique interface with Objective C. The Eiffel Booch Components are available seperately. The Eiffel Booch Components are efficient and orthoginal data structure classes that come complete with test drivers. Included are AVL_TREE, BAG, BINARY_TREE, DEQUE, DICTIONARY, DIRECTED_GRAPH, HASH_TABLE, LIST, MAP, MULTIWAY_TREE, QUEUE, RING, SET, STACK and UNDIRECTED_GRAPH. Most Booch Components are available in a variety of forms offering trade-offs in speed and memory utilization. Also included are dozens of classes for pattern matching, sorting, searching, and iteration, as well as nodes, pairs and other support classes. Tower also sells the TowerEiffel Motif Components. These components work stand-alone as well as in conjunction with an interface to an Eiffelized version of X-Designer -- a leading Motif GUI Builder. Tower also sells the O2 OODBMS and the TowerEiffel/O2 Interface Components. These libraries provide direct and seamless Eiffel persistency. ---------- L04) What's the big deal about preconditions and postconditions? The big deal is that it supports programming by contract. For example, preconditions (require clauses) are simple boolean statements that are used to check that the input arguments are valid and that the object is in a reasonable state to do the requested operation. If not, an exception is generated. Similarly, postconditions (ensure clauses) make sure that a method has successfully performed its duties, thus "fulfilling its contract" with the caller. Invariants are boolean expressions that are checked every time an object method returns back to a separate object. You can use these ideas in any object-oriented programming language, but usually must supply your own assertion mechanisms or rely on programmer discipline. In Eiffel, the ideas are integrated into the whole fabric of the environment. We find them used by: -- the exception handling mechanism. (Tracebacks almost always identify the correct culprit code since preconditions almost always denote an error in the calling method, while postconditions denote an error in the called method.) -- the automatic compilation system. (Assertions can be disabled entirely or selectively by type on a per class basis.) -- the Eiffel compiler (Invariants, preconditions and postconditions are all inherited in a manner that makes logical sense.) (Assertion expressions are not allowed to produce side effects so they can be omitted without effect.) -- the automatic documentation tools (Preconditions and postconditions are important statements about what a method does, often effectively describing the "contract" between the caller and callee. Invariants can yield information about legal states an object can have.) In the future we expect to see formal methods technology work its way into the assertion capability. This will allow progressively more powerful constraints to be put into place. In addition, if a conjecture by Dr. Meyer bears fruit, the notion of preconditions may be extended into an important mechanism for the development of parallel programming. ---------- L05) Please explain and discuss covariance vs. contravariance. Consider the following situation: we have two classes PARENT and CHILD. CHILD inherits from PARENT, and redefines PARENT's feature 'foo'. class PARENT feature foo (arg: A) is ... end class CHILD inherit PARENT redefine foo end feature foo (arg: B) is ... end The question is: what restrictions are placed on the type of argument to 'foo', that is 'A' and 'B'? (If they are the same, there is no problem.) Here are two possibilities: (1) B must be a child of A (the covariant rule - so named because in the child class the types of arguments in redefined routines are children of types in the parent's routine, so the inheritance "varies" for both in the same direction) (2) B must be a parent of A (the contravariant rule) Eiffel uses the covariant rule. At first, the contravariant rule seems theoretically appealing. Recall that polymorphism means that an attribute can hold not only objects of its declared type, but also of any descendant (child) type. Dynamic binding means that a feature call on an attribute will trigger the corresponding feature call for the *actual* type of the object, which may be a descendant of the declared type of the attribute. With contravariance, we can assign an object of descendant type to an attribute, and all feature calls will still work because the descendant can cope with feature arguments at least as general as those of the ancestor. In fact, the descendant object is in every way also a fully-valid instance of the ancestor object: we are using inheritance to implement subtyping. However, in programming real-world applications we frequently need to specialize related classes jointly. Here is an example, where PLOT_3D inherits from PLOT, and DATA_SAMPLE_3D inherits from DATA_SAMPLE. class PLOT feature add(arg: DATA_SAMPLE) is ... class PLOT_3D inherit PLOT redefine add end feature add(arg: DATA_SAMPLE_3D) is ... This requires the covariant rule, and works well in Eiffel. It would fail if we were to put a PLOT_3D object into a PLOT attribute and try to add a DATA_SAMPLE to it. It fails because we have used inheritance to implement code re-use rather than subtyping, but have called a feature of the ancestor class on an object of the descendant class as if the descendant object were a true subtype. It is the compiler's job to detect and reject this error, to avoid the possibility of a run-time type error. Here's another example where a real-world situation suggests a covariant solution. Herbivores eat plants. Cows are herbivores. Grass is a plant. Cows eat grass but not other plants. class HERBIVORE class PLANT feature eat(food: PLANT) is ... diet: LIST[PLANT] class COW class GRASS inherit inherit HERBIVORE PLANT redefine eat end feature eat(food: GRASS) is ... This does what we want. The compiler must stop us from putting a COW object into a HERBIVORE attribute and trying to feed it a PLANT, but we shouldn't be trying to do this anyway. Also consider the container 'diet'. We are not forced to redefine this feature in descendant classes, because with covariant redefinition of the argument to 'eat', the feature 'diet' can always contain any object that can be eaten (e.g. grass for a cow). (With contravariant redefinition of the argument to 'eat', it would be necessary to re-open the parent class to make the type of the container 'diet' more general). To summarise: Real-world problems often lend themselves to covariant solutions. Eiffel handles these well. Incorrect programs in the presence of covariant argument redefinition can cause run-time type errors unless the compiler catches these. Sather uses the contravariant rule, but uses separate mechanisms for subtyping and code reuse and only allows dynamic binding on true subtypes. This seems to make contravariance work well, but it can force the Sather programmer to use concrete types when modelling covariant problems. Concrete types cannot be further subtyped in Sather, so this can reduce the potential for re-use (in Eiffel, any type can be further subtyped, but the compiler must check that it is used validly). ---------- L06) Is it true that there are "holes" in the Eiffel type system? No. The design of Eiffel makes it possible to catch all type errors at compile time, so that an Eiffel program cannot abort with a run time type error. However, to catch the more obscure type errors at compile time, the compiler must analyse the way that classes interact within the entire system, rather than just looking at each class one by one. This type of system-wide checking is also necessary for many compiler optimisations. Because system-wide compile-time validity checking can be complex, some compilers insert run-time traps for these errors instead, and some may fail to correctly trap these errors. Ask your Eiffel compiler vendor how they handle these type problems. ---------- L07) Is there support for concurrency in Eiffel? Eiffel 3 does not support concurrency; neither do current commercial compilers. However, work on concurrency is one of the hottest Eiffel- related research topics. For four articles on concurrency facilities for Eiffel, including Bertrand Meyer's article "Systematic Concurrent Object-Oriented Programming", see the September 1993 "Communications of the ACM" (Vol. 36, Number 9). ---------- L08) Why doesn't Eiffel allow function overloading? In Eiffel, no two features of a class may have the same identifier, regardless of their respective signatures. The prevents the use of function overloading ("multiple polymorphism"), a common programming technique in languages like C++. Eiffel is designed to be minimal: it includes exactly the features that its designer considered necessary, and nothing else. Because Eiffel already supports (single) polymorphism through its inheritance system, the only positive thing that function overloading buys you is reducing the number of feature names you have to learn. This is at the expense of reducing the ability of the compiler to trap mistakes (often type errors). Readability is also enhanced when overloading is not possible. With overloading you would need to consider the type of the arguments as well as the type of the target before you can work out which feature is called. With multiple inheritance and dynamic binding this is awkward for a compiler and error-prone for a human. There is no intuitive rule which could be used to disambiguate routine calls where there is no "nearest" routine. However, in Eiffel it's easy to write one routine with arguments of the most general applicable type, then use the assignment attempt operator to carry out the appropriate operation according to the run-time type of the arguments (thereby explicitly programming the disambiguation "rules"). Having said that, the lack of multiple polymorphism does force us to write some common mathematical operations (e.g. matrix math) in an awkward way, and forces arithmetic expressions to be treated specially (the "arithmetic balancing rule", ETL p385). But no-one has come up with a solution which is so simple, elegant and useful that it improves the quality of Eiffel as a whole. ---------- L09) Why are there no procedural types in Eiffel? The notion of allowing a routine to be passed as an argument to a routine is in many people's view incompatible with the O-O method. The definition of object-orientation implies that every operation belongs to an object type, so one does not manipulate routines just by themselves. A possible technique when one feels the need to use a routine argument is to write a class and include the routine in it. Then (rather than passing a routine argument) pass an object - an instance of this class - to which the routine can then be applied. This is a more flexible approach in the long term. For example, you may later add an "undo" routine to your routine- containing class, or an attribute such as "time of last execution". ---------- L10) Why are there no class attributes in Eiffel? In Eiffel, the "once" function provides greater functionality in a more disciplined way. The body of a "once" function is executed once only, when it is first called. Thereafter, the "once" function returns the same Result without re-executing its body. The "once" function can therefore be used to implement a shared constant object (computed on its first use), or a shared attribute of reference type (initialized on its first use). A "once" function can be included in a mixin class. The shared attribute returned by that once function is then available to all instances of those classes which inherit from the mixin class. ---------- L11) How can I call the parent-class version of a redefined routine? When an inherited routine is redefined in a child class, is there a way for the redefined routine to call the version in the parent class? 1) If you are responsible for the design of the parent class, you may anticipate such a need. You may provide multiple versions of the same routine body, with some versions frozen (not redefinable): class PARENT feature foo, frozen parent_foo is do ... end end class CHILD inherit PARENT redefine foo end feature foo is do parent_foo ... end end 2) Otherwise, you use repeated inheritance to get two versions of 'foo', and redefine one of them: class PARENT feature foo is do ... end end class CHILD inherit PARENT rename foo as parent_foo end PARENT redefine foo select foo -- (in case of dynamic binding) end feature foo is do parent_foo ... end end ---------- L12) Where can I find a comparison between Eiffel and C++? In Richard Wiener's book "Software Development Using Eiffel: There can be life after C++" (Prentice-Hall, ISBN 0-13-100686-X). ---------- L13) Are there any destructors in Eiffel? What about object finalization? Eiffel objects are garbage-collected, so that there is no need for the software developer to worry about whether, how and when to "destruct" or "free" them in the software text. Some implementations offer a "free" procedure for programmers who absolutely want to remove an object manually. Such a procedure is "use at your own risk" and is not needed in normal Eiffel development. Coming back to normal usage, the need may arise to ensure that certain operations will automatically take place whenever the garbage collector reclaims an object. For example if an Eiffel object describing a file becomes unreachable and hence is eventually garbage-collected, you may want to ensure that the physical file will be closed at that time. Some implementations of Eiffel provide a mechanism for that purpose: procedure 'dispose' from the Kernel Library class MEMORY. Whenever the garbage collector collects an object, it calls 'dispose' on that object. The procedure does nothing by default (so that a smart GC will of course avoid executing any actual call). But any class may inherit from MEMORY and redefine 'dispose' to perform appropriate actions, such as closing a file. Such actions are sometimes called "finalization". This technique achieves it conveniently. Because there is no guarantee as to the order in which the garbage collector will reclaim objects that have become unreachable, safe redefinitions of 'dispose' should only act on external resources such as file descriptors, database elements, window system resources etc, not on Eiffel object structures themselves. -- -- Roger Browne, 6 Bambers Walk, Wesham, PR4 3DG, UK | Ph 01772-687525 -- Everything Eiffel: compilers/libraries/publications | +44-1772-687525